home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / include / x11 / xaw / labelp.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  3KB  |  105 lines

  1. /*
  2. * $XConsortium: LabelP.h,v 1.27 91/06/22 19:34:58 rws Exp $
  3. */
  4.  
  5.  
  6. /***********************************************************
  7. Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  8. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  9.  
  10.                         All Rights Reserved
  11.  
  12. Permission to use, copy, modify, and distribute this software and its 
  13. documentation for any purpose and without fee is hereby granted, 
  14. provided that the above copyright notice appear in all copies and that
  15. both that copyright notice and this permission notice appear in 
  16. supporting documentation, and that the names of Digital or MIT not be
  17. used in advertising or publicity pertaining to distribution of the
  18. software without specific, written prior permission.  
  19.  
  20. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  21. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  22. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  23. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  24. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  25. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  26. SOFTWARE.
  27.  
  28. ******************************************************************/
  29.  
  30. /* 
  31.  * LabelP.h - Private definitions for Label widget
  32.  * 
  33.  */
  34.  
  35. #ifndef _XawLabelP_h
  36. #define _XawLabelP_h
  37.  
  38. /***********************************************************************
  39.  *
  40.  * Label Widget Private Data
  41.  *
  42.  ***********************************************************************/
  43.  
  44. #include <X11/Xaw/Label.h>
  45. #include <X11/Xaw/SimpleP.h>
  46.  
  47. /* New fields for the Label widget class record */
  48.  
  49. typedef struct {int foo;} LabelClassPart;
  50.  
  51. /* Full class record declaration */
  52. typedef struct _LabelClassRec {
  53.     CoreClassPart    core_class;
  54.     SimpleClassPart    simple_class;
  55.     LabelClassPart    label_class;
  56. } LabelClassRec;
  57.  
  58. extern LabelClassRec labelClassRec;
  59.  
  60. /* New fields for the Label widget record */
  61. typedef struct {
  62.     /* resources */
  63.     Pixel    foreground;
  64.     XFontStruct    *font;
  65.     char    *label;
  66.     XtJustify    justify;
  67.     Dimension    internal_width;
  68.     Dimension    internal_height;
  69.     Pixmap    pixmap;
  70.     Boolean    resize;
  71.     unsigned char encoding;
  72.     Pixmap    left_bitmap;
  73.  
  74.     /* private state */
  75.     GC        normal_GC;
  76.     GC          gray_GC;
  77.     Pixmap    stipple;
  78.     Position    label_x;
  79.     Position    label_y;
  80.     Dimension    label_width;
  81.     Dimension    label_height;
  82.     Dimension    label_len;
  83.     int        lbm_y;            /* where in label */
  84.     unsigned int lbm_width, lbm_height;     /* size of pixmap */
  85. } LabelPart;
  86.  
  87.  
  88. /****************************************************************
  89.  *
  90.  * Full instance record declaration
  91.  *
  92.  ****************************************************************/
  93.  
  94. typedef struct _LabelRec {
  95.     CorePart    core;
  96.     SimplePart    simple;
  97.     LabelPart    label;
  98. } LabelRec;
  99.  
  100. #define LEFT_OFFSET(lw) ((lw)->label.left_bitmap \
  101.              ? (lw)->label.lbm_width + (lw)->label.internal_width \
  102.              : 0)
  103.  
  104. #endif /* _XawLabelP_h */
  105.